﻿{% extends 'base.html' %}

{% block stylesheets %}
	<link rel="stylesheet" content="text/css" href="/static/css/auth.login.css" />
{% endblock %}

{% block title_suffix %}
    | Login
{% endblock %}

{% block all_content %}
	<div class="hero-unit">
		<h1>EngOnline</h1>
		<p>
			Please login
		</p>
		<p>
			<a href="." class="btn btn-primary btn-large">
				Login with CID
			</a>
		</p>
	</div>
	<div id="alt-login" class="well well-small">
		<div id="alt-login-text">
		    <legend>
		      	<i id="alt-login-collapse"></i> ... or login with a local account
		    </legend>
	    </div>
	    <form class="form-horizontal" action="/login/" method="post">
	        {% csrf_token %}
	        {{ form.as_p }}
	        
	        {% if login_failure %}
				<div id="login-failure" class="alert">
					<strong>Login failed!</strong> Please make sure you are using the correct username and password.
				</div>
			{% endif %}
			
			<div class="control-group">
				<label class="control-label" for="username">Username:</label>
				<div class="controls">
					<input type="text" id="username" name="username" placeholder="Username">
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label" for="password">Password:</label>
				<div class="controls">
					<input type="password" id="password" name="password" placeholder="Password">
				</div>
			</div>
			
			<div class="controls">
				<button type="submit" value="Login" class="btn">Sign in</button>
			</div>
	    </form>
    </div>
{% endblock %}

{% block scripts %}
	<script type="text/javascript" src="/static/script/auth.login.js"></script>
{% endblock %}